﻿using System.Linq;
using System.Web.Mvc;
using GlimpseWCF.GlimpseWcfTestServiceReference;
using GlimpseWcf.TestCore.Data;

namespace GlimpseWCF.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            var client = new GlimpseWcfTestServiceClient();
            //client.ChannelFactory.Endpoint.Behaviors.Add(new WcfEndpointBehavior(HttpContext));
            var x = client.GetData();
            var y = client.GetData();

            //var context = new Entities();
            //var z = context.UserProfiles.First().UserName;

            ViewBag.Message = x;// + " : " + z;
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
